package com.haiyi.activiti.engine.util;

import org.apache.commons.lang3.StringUtils;

/**
 * <p> </p>
 *
 * <pre> Created: 2018/12/3 15:16 </pre>
 *
 * @author hlu
 * @version 1.0
 * @since JDK 1.7
 */
public class Assert {

    public static void isNotEmpty(String str,String message){
        if(StringUtils.isEmpty(str)){
            throw new IllegalArgumentException(message);
        }
    }

    public static void isNotNull(Object obj,String message){
        if(obj==null){
            throw new IllegalArgumentException(message);
        }
    }

    public static void isTrue(Boolean b,String message){
        if(b==null||!b){
            throw new IllegalArgumentException(message);
        }
    }

}
